package com.ee.chat.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 及时通讯消息表
 * </p>
 *
 * @author Shane
 * @since 2019-10-14
 */
@TableName("user_im_log")
public class UserImLog implements Serializable {

    private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@TableId(type = IdType.AUTO)
	private Integer id;

	/**
	 * 消息标识(uuid)
	 */
	@TableField(value="msg_id")
	private String msgId;

	@TableField(value = "msg_timestamp")
	private String msgTimestamp;

	/**
	 * 发送者id
	 */
	@TableField(value="from_user_id")
	private Integer fromUserId;

	/**
	 * 接受者id
	 */
	@TableField(value="to_user_id")
	private Integer toUserId;

	/**
	 * 消息类型；
	 */
	@TableField(value = "`type`")
	private String type;

	/**
	 * 消息内容
	 */
	private String msg;

	private String attach;

	@TableField(value = "`status`")
	private Integer status;

	/**
	 * CURRENT_TIMESTAMP
	 */
	@TableField(value="create_time")
	private Date createTime;

	@TableField(value = "is_sys")
	private Integer isSys;

	@TableField(value = "keywords")
	private String keywords;

	public UserImLog() {
	}

	public UserImLog(String msgId, String msgTimestamp, Integer fromUserId, Integer toUserId, String type, String msg, String attach) {
		this.msgId = msgId;
		this.msgTimestamp = msgTimestamp;
		this.fromUserId = fromUserId;
		this.toUserId = toUserId;
		this.type = type;
		this.msg = msg;
		this.attach = attach;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getMsgId() {
		return msgId;
	}

	public void setMsgId(String msgId) {
		this.msgId = msgId;
	}

	public String getMsgTimestamp() {
		return msgTimestamp;
	}

	public void setMsgTimestamp(String msgTimestamp) {
		this.msgTimestamp = msgTimestamp;
	}

	public Integer getFromUserId() {
		return fromUserId;
	}

	public void setFromUserId(Integer fromUserId) {
		this.fromUserId = fromUserId;
	}

	public Integer getToUserId() {
		return toUserId;
	}

	public void setToUserId(Integer toUserId) {
		this.toUserId = toUserId;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getAttach() {
		return attach;
	}

	public void setAttach(String attach) {
		this.attach = attach;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getIsSys() {
		return isSys;
	}

	public void setIsSys(Integer isSys) {
		this.isSys = isSys;
	}

	public String getKeywords() {
		return keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}
}
